/* 
 * File:   Neuron.cpp
 * Author: Martin
 * 
 * Created on 28. červen 2010, 22:32
 */

#include "Neuron.h"
#include "Network.h"

Neuron::Neuron(int INPUT_SIZE) {
    this->INPUT_SIZE = INPUT_SIZE;
    init();
}

/*Neuron::Neuron(Network net) {
    network = net;
}*/

Neuron::Neuron(const Neuron& orig) {
    //metodu asi odstranit
}

Neuron::~Neuron() {
}

void Neuron::init() {
    int i, j, rand_int;
    weight_vector = (double *) malloc(sizeof (double) * INPUT_SIZE);
    for (i = 0; i < INPUT_SIZE; i++) {
    //for (i = 0; i < network.get_input_size(); i++) {
        rand_int = rand() % 100;
        //std::cout << rand_int;
        weight_vector[i] = rand_int * 10E-4;
    }
}

void Neuron::print() {
    //std::cout << "Neuron:\n";
    for (int i = 0; i < (INPUT_SIZE); i++) {
        std::cout << weight_vector[i];
        std::cout << ' ';
    }
    std::cout << '\n';
}

